<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class About extends CI_Controller {
 
    function __construct()
    {
        parent::__construct();
 
        /* Standard Libraries */
        $this->load->database();
        $this->load->helper('url');

        /* ------------------ */    
 
        $this->load->library('grocery_CRUD');
 
    }
 
    public function index()
    {
 
    }
 
    public function admin()
    {
        $crud = new grocery_CRUD();
 
        $crud->set_table('about');
		$crud->required_fields('desc');
		
		$this->load->model('Model_About');
		if($this->Model_About->getCount()>0)
		{
			$crud->unset_add();
			$crud->unset_delete();
		}
        $output = $crud->render();
 
        $this->_example_output($output);                
    }
 
    function _example_output($output = null)
 
    {
        $this->load->view('admin/admin.php',$output);    
    }    
}